package com.cn.wanxi.test;

import java.util.Random;

public class MaxTwoNum {
    private static int maxNum(int m, int n) {

        return m > n ? m : n;
    }
    public static void main(String[] args) {
        /**
         * 1.有两个值:随机数
         * 2.最大值
         */

        int m = getRandom(10);
        int n = getRandom(20);
        System.out.println("m:" + m + " n:" + n);
        int max = maxNum(m, n);
        System.out.println("最大值为：" + max);
    }

    private static int getRandom(int i) {
        Random random = new Random();
        return random.nextInt(i);
//        return  random.nextBoolean();
    }


}
